home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / smalltlk.zip / SOURCES / BYTE.H < prev    next >
Text File  |  1987-06-17  |  896b  |  38 lines

  1. /*
  2.     Little Smalltalk
  3.         Bytearray definitions
  4. */
  5.  
  6. struct byte_struct {
  7.     int     a_ref_count;
  8.     int     a_size;
  9.     int    a_bsize;
  10.     uchar    *a_bytes;
  11.     } ;
  12.  
  13. typedef struct byte_struct bytearray;
  14.  
  15. # define byte_value(x) (((bytearray *)(x))->a_bytes)
  16.  
  17. /*
  18.     bytearrays of size less than MAXBSAVE are kept on a free list
  19. */
  20. # define MAXBSAVE 50
  21.  
  22. /*
  23.     in order to avoid a large number of small mallocs, especially
  24.     while reading the standard prelude, a fixed area of MAXBTABSIZE is
  25.     allocated and used for bytecodes until it is full.  Thereafter
  26.     bytecodes are allocated using malloc.  This area should be large
  27.     enough to hold at least all the bytecodes for the standard prelude.
  28. */
  29. # define MAXBTABSIZE 5500
  30.  
  31. /*
  32.     for the same reason, a number of bytearrays structs are statically
  33.     allocated and placed on a free list
  34. */
  35. # define MAXBYINIT 400
  36.  
  37. extern object *new_bytearray();
  38.